/**
 * @Author: YCKOKO
 * @Date: 2023-05-19
 * @Time:13:28
 * @Description:
 */
public class demo1 {
    public int getLCA(int a, int b) {
    // write code here
        while(a!=b){
            if(a>b){
                a/=2;
            }else{
                b/=2;
            }
        }
        return a;
    }
}
